package com.hangwei.aicabinet.util;

/**
 * Created by 张龙臣 on 2018/9/18.
 */

public class PopUtil {
//    public static PopupWindow getOrderPop(final Activity activity) {
//        final PopupWindow window = new PopupWindow(activity, null, R.style.Transparent_Dialog);
//        View view = LayoutInflater.from(activity).inflate(R.layout.pop_order, null);
//        LinearLayout llGet = (LinearLayout) view.findViewById(R.id.llGet);
//        LinearLayout llSend = (LinearLayout) view.findViewById(R.id.llSend);
//        LinearLayout llRepair = (LinearLayout) view.findViewById(R.id.llRepair);
//
//        window.setContentView(view);
//
//        window.setWidth(ViewGroup.LayoutParams.WRAP_CONTENT);
//        window.setHeight(ViewGroup.LayoutParams.WRAP_CONTENT);
//
//        WindowManager.LayoutParams lp = activity.getWindow().getAttributes();
//        lp.alpha = 0.7f; //0.0-1.0
//        activity.getWindow().setAttributes(lp);
//        window.setOnDismissListener(new PopupWindow.OnDismissListener() {
//            @Override
//            public void onDismiss() {
//                WindowManager.LayoutParams lp = activity.getWindow().getAttributes();
//                lp.alpha = 1.0f; //0.0-1.0
//                activity.getWindow().setAttributes(lp);
//            }
//        });
//        window.setBackgroundDrawable(new BitmapDrawable());
//        window.setFocusable(true);
//        window.setOutsideTouchable(true);
////        window.update();
//        return window;
//    }
}
